﻿using RankDemo.WebApi.Entities;
using RankDemo.WebApi.Services;

namespace RankDemo.WebApi.Extensions
{
    public static class SeedDataExtension
    {
        public static void InitSeedData(this WebApplication application)
        {
            var _customerService = application.Services.GetService<ICustomerService>();
            var _rankService = application.Services.GetService<IRankService>();

            var customer15514665 = new Customer().SetCustomerId(15514665).ChangeScore(124);
            _customerService.CreateCustomer(customer15514665);
            _rankService.CreateCustomer(customer15514665);

            var customer81546541 = new Customer().SetCustomerId(81546541).ChangeScore(113);
            _customerService.CreateCustomer(customer81546541);
            _rankService.CreateCustomer(customer81546541);

            var customer1745431 = new Customer().SetCustomerId(1745431).ChangeScore(100);
            _customerService.CreateCustomer(customer1745431);
            _rankService.CreateCustomer(customer1745431);

            var customer76786448 = new Customer().SetCustomerId(76786448).ChangeScore(100);
            _customerService.CreateCustomer(customer76786448);
            _rankService.CreateCustomer(customer76786448);

            var customer254814111 = new Customer().SetCustomerId(254814111).ChangeScore(96);
            _customerService.CreateCustomer(customer254814111);
            _rankService.CreateCustomer(customer254814111);

            var customer53274324 = new Customer().SetCustomerId(53274324).ChangeScore(95);
            _customerService.CreateCustomer(customer53274324);
            _rankService.CreateCustomer(customer53274324);

            var customer6144320 = new Customer().SetCustomerId(6144320).ChangeScore(93);
            _customerService.CreateCustomer(customer6144320);
            _rankService.CreateCustomer(customer6144320);

            var customer8009471 = new Customer().SetCustomerId(8009471).ChangeScore(93);
            _customerService.CreateCustomer(customer8009471);
            _rankService.CreateCustomer(customer8009471);

            var customer11028481 = new Customer().SetCustomerId(11028481).ChangeScore(93);
            _customerService.CreateCustomer(customer11028481);
            _rankService.CreateCustomer(customer11028481);

            var customer38819 = new Customer().SetCustomerId(38819).ChangeScore(92);
            _customerService.CreateCustomer(customer38819);
            _rankService.CreateCustomer(customer38819);
        }
    }
}
